{{define "content"}}
<article class="grid">
    <div>
      <hgroup>
        <h1>Manage Pod</h1>
        <h2>Update your Pod settings here</h2>
      </hgroup>
      <form action="/manage/pod" enctype="multipart/form-data" method="POST">
        <div>
          <hgroup>
            <h2>
              <img id="avatar" class="avatar" src="/pod/avatar" alt="No avatar uploaded" />
            </h2>
          </hgroup>
          <label for="avatar">
            Change avatar
            <input id="avatar_upload" type="file" accept="image/png, image/jpeg" name="avatar_file" aria-label="Upload Avatar" />
          </label>
        </div>
        <label for="podName">
            Pod Name:
            <input id="podName" type="text" name="podName" placeholder="Pod Name" aria-label="podName" value="{{ .InstanceName }}">
        </label>
        <label for="podDescription">
            Pod Description:
            <input id="podDescription" type="text" name="podDescription" placeholder="Pod Description" aria-label="podDescription" value="{{ .Meta.Description }}">
        </label>
        <div class="grid">
            <div>
                <label for="maxTwtLength">
                Max Twt Length:
                <input id="maxTwtLength" type="number" name="maxTwtLength" placeholder="Max Twt Length" aria-label="maxTwtLength" value="{{ .MaxTwtLength }}">
                </label>
            </div>
            <div>
                <legend>Other settings:</legend>
                <label for="enableOpenRegistrations">
                <input id="enableOpenRegistrations" type="checkbox" name="enableOpenRegistrations" aria-label="Allow open registrations" role="switch" {{ if not .RegisterDisabled }}checked{{ end }} />
                Allow open registrations
                </label>
                <label for="enableOpenProfiles">
                <input id="enableOpenProfiles" type="checkbox" name="enableOpenProfiles" aria-label="Allow open profiles" role="switch" {{ if .OpenProfiles }}checked{{ end }} />
                Allow open profiles
                </label>
            </div>
        </div>
        
        <button type="submit" class="primary">Update</button>
      </form>
    </div>
</article>
{{end}}
